package com.shr.lease.web.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shr.lease.model.entity.BrowsingHistory;
import com.shr.lease.web.admin.service.BrowsingHistoryService;
import com.shr.lease.web.admin.mapper.BrowsingHistoryMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author liubo
* @description 针对表【browsing_history(浏览历史)】的数据库操作Service实现
* @createDate 2023-07-24 15:48:00
*/
@Service
public class BrowsingHistoryServiceImpl extends ServiceImpl<BrowsingHistoryMapper, BrowsingHistory>
    implements BrowsingHistoryService{

    @Resource
    private BrowsingHistoryMapper browsingHistoryMapper;

    @Override
    public List<Long> selectAllUserId() {
        return browsingHistoryMapper.selectAllUserId();
    }

    @Override
    public void removeOldRecords(long deleteCount, Long userId) {
        browsingHistoryMapper.deleteOldBrowseRecords(deleteCount,userId);
    }
}




